package com.sugar.psych.assessment.module.business.dal.mysql.avatarinfo;

import java.util.*;

import com.sugar.psych.assessment.framework.common.pojo.PageResult;
import com.sugar.psych.assessment.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.sugar.psych.assessment.framework.mybatis.core.mapper.BaseMapperX;
import com.sugar.psych.assessment.module.business.dal.dataobject.avatarinfo.AvatarInfoDO;
import org.apache.ibatis.annotations.Mapper;
import com.sugar.psych.assessment.module.business.controller.admin.avatarinfo.vo.*;

/**
 * 随机头像 Mapper
 *
 * @author Ysugar
 */
@Mapper
public interface AvatarInfoMapper extends BaseMapperX<AvatarInfoDO> {

    default PageResult<AvatarInfoDO> selectPage(AvatarInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AvatarInfoDO>()
                .betweenIfPresent(AvatarInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AvatarInfoDO::getId));
    }

}